package com.boge.study.design_pattern.observer.pull_model;

import lombok.Data;

/**
 * 具体的观察者对象，实现更新的方法，使自身的状态和目标的状态保持一致
 */
@Data
public class ConcreteObserver implements Observer {

    private String observerName;

    private String weatherContent;

    private String remindThing;

    @Override
    public void update(WeatherSubject weatherSubject) {
        weatherContent = ((ConcreteWeatherSubject) weatherSubject).getWeatherContent();
        System.out.println(observerName + "收到了" + weatherContent + "," + remindThing);
    }

}
